﻿/*
=============================================================================
Author:魏宝辉通过CodeSmithe生成
CreatedTime:2012-12-12
Description:Moblie_Log三层结构数据访问层
=============================================================================
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using PWMIS.DataMap.Entity;
using FTchina.Models;//引入模型层
namespace FTchina.DAL
{
	public static partial class Moblie_LogService
	{
		 
	 
			
		public static int DeleteMoblie_LogById(int id)	
		{     
            Moblie_Log moblie_Log = new Moblie_Log();
            moblie_Log.Id = id;
            EntityQuery<Moblie_Log> query = new EntityQuery<Moblie_Log>(moblie_Log);
             return query.Delete(moblie_Log);
		}	
        
          //以标识列获得对象
        public static Moblie_Log GetMoblie_LogById(int  id)
        {
            Moblie_Log moblie_Log = new Moblie_Log();
            moblie_Log.Id = id;
            EntityQuery<Moblie_Log> query = new EntityQuery<Moblie_Log>(moblie_Log);
            query.FillEntity(moblie_Log);
            return moblie_Log;
        }
		
	 
	 
       
        
        
        
		 
		 
		 public static int AddOrUpdateMoblie_Log(Moblie_Log moblie_Log)
        {
            Moblie_Log _moblie_Log = new Moblie_Log();

            EntityQuery<Moblie_Log> query = new EntityQuery<Moblie_Log>(_moblie_Log);
           _moblie_Log= moblie_Log;
           int i=(moblie_Log.Id==0)?
                 query.Insert(_moblie_Log): query.Update(_moblie_Log);
            return i;
        }
		
		 
	}
}

